import { createBrowserRouter } from "react-router-dom";
import Layout from "../pages/Layout";
import Month from "../pages/Month";
import Year from "../pages/Year";
import New from "../pages/New";

/**
 * 创建一个React Router配置文件，包含以下路由：/、/month、/year、/new。其中/month和/year是嵌套在/下的子路由。
 */
export const router = createBrowserRouter([
	{
		path: "/",
		element: <Layout />,
		children: [
			{
				path: "month",
				element: <Month />,
			},
			{
				path: "year",
				element: <Year />,
			},
		],
	},
	{
		path: "new",
		element: <New />,
	},
]);
